﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

namespace UITLibraryManagement
{
    public class GenericCopyContructorBase<T> where T : class
    {
        public GenericCopyContructorBase(T copy)
        {
            Type t = typeof(T);
            PropertyInfo[] properties = t.GetProperties();
            foreach (PropertyInfo pi in properties)
            {
                pi.SetValue(this, pi.GetValue(copy, null), null);
            }
        }

        public GenericCopyContructorBase()
        {
        }
    }
}
